<%--
  Created by IntelliJ IDEA.
  User: ming
  Date: 2021/11/10
  Time: 20:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <table>
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>工资</td>
            <td>密码</td>
            <td>部门编号</td>
            <td>出生日期</td>
        </tr>
<%--items 用于接收集合对象，var 定义对象接收从集合里遍历出的每一个元素。同时其会自动转型--%>
        <c:forEach items="${empInfo.list}" var="e">
            <tr>
                <td>${e.eno}</td>
                <td>${e.ename}</td>
                <td>${e.esex}</td>
                <td>${e.salary}</td>
                <td>${e.pwd}</td>
                <td>${e.dno}</td>
                <td>${e.bornDate}</td>
            </tr>
        </c:forEach>
        <tr>
            <td colspan="7">
                <a href="${pageContext.request.contextPath}/getpage?pageIndex=1">首页</a>
                <a href="${pageContext.request.contextPath}/getPage?pageIndex=${empInfo.pageNum-1}">上一页</a>
                <c:forEach items="${empInfo.navigatepageNums}" var="i">
                    <a href="${pageContext.request.contextPath}/getPage?pageIndex=${i}">${i}</a>
                </c:forEach>
                <a href="${pageContext.request.contextPath}/getPage?pageIndex=${empInfo.pageNum+1}">下一页</a>
                <a href="${pageContext.request.contextPath}/getPage?pageIndex=${empInfo.pages}">尾页</a>
                &nbsp;${empInfo.pageNum}/${empInfo.pages}
            </td>
        </tr>
    </table>

</body>
</html>
